<script>
	import Vue from 'vue'
	export default {
		data() {
			return {}
		},
		onLaunch: function() {
			// 检测版本更新
			this.plusReady()
		},
		onShow: function() {
			console.log('App Show')
			//解决uniapp设置自动登录跳转首页时加载登录页问题
			setTimeout(() => {
				// #ifdef APP-PLUS
				plus.navigator.closeSplashscreen();
				// #endif
			}, 2000);
		},
		onHide: function() {},
		methods: {
			plusReady() {
				// 获取本地应用资源版本号  
				let verobj = {}
				plus.runtime.getProperty(plus.runtime.appid, function(info) {
					verobj = {
						version: info.version,
						verCode: info.versionCode
					}
					uni.setStorageSync('version', verobj);
				});
			},
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import url('./static/iconfont/iconfont.css');
	@import "@/uni_modules/uview-ui/index.scss";

	/* 页面背景色 */
	page {
		font-size: 16px;
		position: relative;
		background-color: #f5f5f5;
	}
</style>